package com.sunlands.qdcy.tongzhuo.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.util.Date;

/**
 * @author gaoyanfeng
 * @title: UserDiary
 * @date 2019/5/2914:21
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity(name = "tz_user_diary_comment")
@JsonSerialize
@DynamicUpdate
@DynamicInsert
@ApiModel(value = "日记评论信息")
public class UserDiaryCommentDO {

    @Id
    @GeneratedValue
    @ApiModelProperty(value = "评论id")
    private Long id;

    @ApiModelProperty(value = "日记id")
    private Long diaryId;

    @ApiModelProperty(value = "评论用户id")
    private Long pinglunUserId;

    @ApiModelProperty(value = "评论内容")
    private String pinglunContent;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

}
